<?php
use \blog\libs\BHtml;
use \blog\libs\option;
?>
<!DOCTYPE html>
<html>
<head>
	<title>基本设置 - SYBlog</title>
	<?php Sy::view('admin/common/header'); ?>
</head>
<body>
	<?php Sy::view('admin/common/navbar', ['page' => 'option']); ?>
	<div id="option" class="page-content">
		<h2 class="title">基本设置</h2>
		<div class="row">
			<div class="input-field col s4">
				<input type="text" name="sitename" class="option_input" value="<?=addslashes(option::get('sitename'))?>" />
				<label for="title">站点名称</label>
			</div>
			<div class="input-field col s4">
				<input type="text" name="description" class="option_input" value="<?=addslashes(option::get('description'))?>" />
				<label for="title">站点描述</label>
			</div>
			<div class="input-field col s4">
				<input type="text" name="author" class="option_input" value="<?=addslashes(option::get('author'))?>" />
				<label for="title">文章作者</label>
			</div>
			<div class="input-field col s4">
				<input type="number" name="pagesize" class="option_input" value="<?=addslashes(option::get('pagesize'))?>" />
				<label for="title">单页文章数量</label>
			</div>
			<div class="input-field col s4">
				<input type="text" name="cronPassword" class="option_input" value="<?=addslashes(option::get('cronPassword'))?>" />
				<label for="title">Cron密码</label>
			</div>
			<div class="input-field col s4">
				<select name="static" class="browser-default option_input"><option value="0"<?php if (option::get('static') == 0) echo ' selected'; ?>>关</option><option value="1"<?php if (option::get('static') == 1) echo ' selected'; ?>>开</option></select>
				<label for="title" class="active">生成真静态</label>
			</div>
		</div>
		<div><button id="opt_bas_submit" type="button" class="waves-effect waves-light btn">保存</button></div>
	</div>
	<script>
	window.sy = {
		"url": {
			"submit": "<?=Sy::createUrl('admin/option/save', 'json')?>"
		},
		"page": "Option"
	};
	</script>
	<?php Sy::view('admin/common/footer'); ?>
</body>
</html>